async-hooks,net: ensure asyncId=null if no handle#13938
async-hooks,net: ensure asyncId=null if no handle#13938baudehlo wants to merge 4 commits intonodejs:masterfrom
Conversation
|
Fixes #13548 |
There was a problem hiding this comment.
Can you make a few edits? Also, it would be perfect if you could include Fixes: https://github.com/nodejs/node/issues/13548 in the commit message itself so that the issue will automatically be closed when this is merged.
Thank you for doing this!
@nodejs/async_hooks
There was a problem hiding this comment.
Can you indent using 2 spaces? I think our linter complains otherwise.
There was a problem hiding this comment.
Can you const common = require('../common'); here?
There was a problem hiding this comment.
You can just call server.getConnections(common.mustCall()) or server.getConnections(common.mustCall(fn)), that’s a bit shorter (and actually makes sure that the callback gets executed) :)
There was a problem hiding this comment.
You don’t need the try/catch, if an error is thrown the test is going to fail anyway because the process crashes with an uncaught exception
There was a problem hiding this comment.
OK, would you prefer a comment to that effect then? I was trying to write the test showing the context of what happened before the change.
refack
left a comment
There was a problem hiding this comment.
LGTM % previous comments (to get linter passing)
|
Will address the edits. I think adding the Fixes line in a comment works with github too fwiw. |
There was a problem hiding this comment.
The comment is good 👍
Style nit: line comments (//) are prefered.
And replace See: with Ref:
There was a problem hiding this comment.
unused assert will fail linter.
|
CI: https://ci.nodejs.org/job/node-test-commit/10779/ not ok 3 - /usr/home/iojs/build/workspace/node-test-linter/test/async-hooks/test-get-connections.js
---
message: '''assert'' is assigned a value but never used.'
severity: error
data:
line: 4
column: 7
ruleId: no-unused-vars
messages:
- message: Trailing spaces not allowed.
severity: error
data:
line: 10
column: 1
ruleId: no-trailing-spaces
... |
|
I guess this is the kind of change needed for |
There was a problem hiding this comment.
Hi, please rename the file to test-net-get-connections.js.
|
CI: https://ci.nodejs.org/job/node-test-pull-request/8942/ @baudehlo will you rename the file and add |
|
Just moved house and have no internet until Friday. So could you do it?
… On Jul 3, 2017, at 4:28 AM, Andreas Madsen ***@***.***> wrote:
CI: https://ci.nodejs.org/job/node-test-pull-request/8942/
@baudehlo will you rename the file. If not, I can do it myself.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
If the .listen() hasn't been called on the server, there is no handle object. In this case use null as the triggerAsyncId. Fixes: nodejs#13548
a968e81 to
6ccf034
Compare
|
landed in aa8655a |
|
I think it should have been |
|
@tniessen sorry about that. |
If the .listen() hasn't been called on the server, there is no handle object. In this case use null as the triggerAsyncId. Fixes: #13548 PR-URL: #13938 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com> Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
If the .listen() hasn't been called on the server, there is no handle object. In this case use null as the triggerAsyncId. Fixes: #13548 PR-URL: #13938 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com> Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
If the .listen() hasn't been called on the server, there is no handle object. In this case use null as the triggerAsyncId. Fixes: #13548 PR-URL: #13938 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com> Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
async-hooks, net